:: [a] -> Int -> a

List index (subscript) operator, starting from 0. It is an instance of the more general genericIndex, which takes an index of any integral type.
>>> ['a', 'b', 'c'] !! 0
'a'

>>> ['a', 'b', 'c'] !! 2
'c'

>>> ['a', 'b', 'c'] !! 3
*** Exception: Prelude.!!: index too large

>>> ['a', 'b', 'c'] !! (-1)
*** Exception: Prelude.!!: negative index
WARNING: This function is partial. You can use atMay instead.
Synonym for !!, but includes more information in the error message.
List index (subscript) operator, starting from 0. It is an instance of the more general genericIndex, which takes an index of any integral type.
>>> ['a', 'b', 'c'] !! 0
'a'

>>> ['a', 'b', 'c'] !! 2
'c'

>>> ['a', 'b', 'c'] !! 3
*** Exception: Prelude.!!: index too large

>>> ['a', 'b', 'c'] !! (-1)
*** Exception: Prelude.!!: negative index
List index (subscript) operator, starting from 0. It is an instance of the more general genericIndex, which takes an index of any integral type.
A variant of !! that might provide more informative error messages if the index is out of bounds. Precondition: The index should not be out of bounds.
List index (subscript) operator, starting from 0. It is an instance of the more general genericIndex, which takes an index of any integral type.
>>> ['a', 'b', 'c'] !! 0
'a'

>>> ['a', 'b', 'c'] !! 2
'c'

>>> ['a', 'b', 'c'] !! 3
Exception: Prelude.!!: index too large

>>> ['a', 'b', 'c'] !! (-1)
Exception: Prelude.!!: negative index
like !! selects nth element from xs, but wraps over at the end of xs
>>> map ((!!!) [1,3,5]) [0,1,2,3,4,5]
[1,3,5,1,3,5]
(!!) but with a better error message if it fails. Use this only where it shouldn't fail!
(‼) = (!!) U+203C, DOUBLE EXCLAMATION MARK
The genericIndex function is an overloaded version of !!, which accepts any Integral value as the index.
The index must be smaller than the length of the list, otherwise the result is undefined.
Select one of provided alternatives given a number.
O(1) Indexing.
O(1) Unsafe indexing without bounds checking.
O(1) Indexing
O(1) Unsafe indexing without bounds checking
Optional more efficient implementation of indexing. Shouldn't be used directly, use ! instead.
Retrieve vector's element at index. Generic implementation is O(n) but more efficient one is used when possible.
Infix version of unsafeIndex.
Similar to !! but with flipped arguments. get element from list using index value starting from `0`.
>>> at 2 ["a", "b", "c"]
"c"
it is also useful when used in a partially applied position like:
>>> map (at 1) [["a","b","c"], ["a","b","c"], ["a","b","c"]]
["b","b","b"]